[#738] Writer tab v9: status/created to deadline, rating stat box#740
[#738] Writer tab v9: status/created to deadline, rating stat box#740realproject7 merged 3 commits intomainfrom
Conversation
…ting box 1. Move active/complete tag from stat boxes to Deadline divider section 2. Move Created date to Deadline section with full year (e.g. Mar 26, 2026) 3. Replace empty 4th stat box with Rating (average or "—") Fixes #738 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE — all 3 items for #738 verified:
- Active/complete tag moved to deadline divider section with dot separator before countdown ✓
- Created date in deadline section with full year (year: 'numeric') ✓
- 4th stat box replaced with Rating (useQuery to /api/ratings, average.toFixed(1) or '—') ✓
Deadline section now always renders (status + Created visible for both active and complete stories) — good improvement over the previous conditional render. Rating query uses 60s staleTime, consistent with existing per-card query pattern. Single file, net +20 lines. Clean.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The deadline/status and created-date layout changes look aligned with issue #738, but the new rating box is implemented by adding a fresh client-side ratings fetch inside every StoryRow.
Findings
- [medium] The rating stat now starts its own
/api/ratingsquery per story card inStoryRow, even though the repo already has rating-fetching helpers/components and the ticket explicitly called for using existing ratings data. That turns the Writer tab into an N+1 request pattern for a layout-only change and adds duplicate ratings-fetch logic to the page.- File:
src/app/profile/[address]/page.tsx:815 - Suggestion: derive the average from the existing storyline/ratings data path, or reuse/extend the existing rating helper/component instead of adding a new per-card query.
- File:
Decision
Requesting changes because the layout requirements are mostly in place, but the rating box implementation introduces avoidable duplicate network work and does not follow the ticket’s existing-data requirement.
…etch Addresses T2a review: replace per-card /api/ratings fetch with a single supabase query in StoriesTab that batch-fetches all ratings for the writer's storylines and passes them down as a prop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The N+1 ratings-fetch problem is fixed, but the new batch ratings query still misses the repo’s normal contract scoping.
Findings
- [medium] The new batch ratings query reads from
ratingsbystoryline_idonly and does not filter bycontract_address, unlike the existing/api/ratingsroute and other ratings reads. That can pull ratings from the wrong contract/factory into the Writer stat box if ids overlap, so the displayed average is no longer guaranteed to match the rest of the app.- File:
src/app/profile/[address]/page.tsx:575 - Suggestion: add the same
contract_address = STORY_FACTORY.toLowerCase()filter used by the existing ratings code path.
- File:
Decision
Requesting changes because the batching approach is better, but the new query still needs the existing contract filter to keep rating averages correct.
Scopes the ratings query to STORY_FACTORY, matching the existing ratings API pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up fixes resolve my review findings. Ratings are now fetched once at the StoriesTab level, the batch query is scoped with the existing contract_address filter, and the Writer v9 layout changes match issue #738.
Findings
- None.
Decision
Approving because the remaining review blockers are addressed and I do not see a code-level mismatch against the ticket.
Summary
/api/ratingsendpointFixes #738
Test plan
🤖 Generated with Claude Code